package example.dao;

import example.entity.Goods;
import example.entity.Orderdetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface orderMapper {
    @Select("select * from orderdetail inner join goods ON orderdetail.gdID = goods.gdID")
    List<Goods> findAll();

    @Select("select * from orderdetail inner join goods ON orderdetail.gdID = goods.gdID")
    List<Orderdetail> findAlld();


    @Delete("delete from orderdetail where odId = #{id}")
    int deleteById(Integer id);
}
